﻿using FileTransferDesktop.ViewModels.Controls;

namespace FileTransferDesktop.Controls
{
    public partial class SpeedChartControl : UserControl
    {
        public SpeedChartViewModel ViewModel => (SpeedChartViewModel)DataContext;

        public SpeedChartControl()
        {
            InitializeComponent();
        }

        public SpeedChartViewModel ChartViewModel
        {
            get => (SpeedChartViewModel)GetValue(ChartViewModelProperty);
            set => SetValue(ChartViewModelProperty, value);
        }

        public static readonly DependencyProperty ChartViewModelProperty =
            DependencyProperty.Register(
                nameof(ChartViewModel),
                typeof(SpeedChartViewModel),
                typeof(SpeedChartControl),
                new PropertyMetadata(null)
            );
    }
}
